-- GENERATED SPELL FOR [Tinky Wickwhistle] --


function spell0_30162(pUnit, Event) --@Heavy Dynamite,n/a--
pUnit:FullCastSpellOnTarget(37666,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30162', 579, 1)
end

function spell1_30162(pUnit, Event) --@Wrench Strike,n/a--
pUnit:FullCastSpellOnTarget(61552,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30162', 580, 1)
end

function Sorts_30162(pUnit, Event)
local choix_sorts_30162 = math.random(0, 1)
if choix_sorts_30162 == 0 then
pUnit:RegisterEvent('spell0_30162', 1, 1)
end
if choix_sorts_30162 == 1 then
pUnit:RegisterEvent('spell1_30162', 1, 1)
end
end

function mob30162_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30162', math.random(1500, 3000), 1)
end

function mob30162_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30162_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30162_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30162, 1, 'mob30162_Action')
RegisterUnitEvent(30162, 2, 'mob30162_Leave')
RegisterUnitEvent(30162, 3, 'mob30162_Kill')
RegisterUnitEvent(30162, 4, 'mob30162_Die')
